package hhq.demo.utils;

import com.alibaba.fastjson.JSONObject;

public final class ResJson {

    public static String getString(int code, String mess, Object data){
        JSONObject js = new JSONObject();
        js.put("code", code);
        js.put("mess", mess);
        js.put("data", data);
        return js.toJSONString();
    }
    public static String getString(int code, String mess ){
        return getString(code, mess, null);
    }
}